package com.sc.everyonerentboot.mapper;

import com.sc.everyonerentboot.pojo.BrowsingHistory;
import com.sc.everyonerentboot.pojo.BrowsingHistoryKey;
import org.apache.ibatis.annotations.Param;

public interface BrowsingHistoryMapper {
    int deleteByPrimaryKey(BrowsingHistoryKey key);

    int insert(BrowsingHistory record);

    int insertSelective(BrowsingHistory record);

    BrowsingHistory selectByPrimaryKey(BrowsingHistoryKey key);

    int updateByPrimaryKeySelective(BrowsingHistory record);

    int updateByPrimaryKey(BrowsingHistory record);

    Integer[] selectPidByUserId(Integer userId);

    int deleteByUserIdAndPids(@Param("userId")Integer userId, @Param("pids")Integer[] pids);

    int addBrowsingHistory(@Param("userId") Integer userId, @Param("pid") Integer pid);

    int findByUserIdAndPid(@Param("userId")Integer userId, @Param("pid") Integer pid);
}